<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>openid.server.trustroot</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="openid-module.html">Package&nbsp;openid</a> ::
        <a href="openid.server-module.html">Package&nbsp;server</a> ::
        Module&nbsp;trustroot
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="openid.server.trustroot-module.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF MODULE DESCRIPTION =========== -->
<h2 class="module">Module openid.server.trustroot</h2>

<p>This module contains the <code><a 
href="openid.server.trustroot.TrustRoot-class.html" 
class="link"><code>TrustRoot</code></a></code> class, which helps handle 
trust root checking. This module is used by the <code><a 
href="openid.server.server-module.html" 
class="link"><code>openid.server.server</code></a></code> module, but it 
is also available to server implementers who wish to use it for 
additional trust root checking.</p>
It also implements relying party return_to URL verification, based on 
the realm.
<hr/>

<!-- =========== START OF CLASSES =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Classes</th></tr>
<tr><td width="15%">
  <b><a href="openid.server.trustroot.TrustRoot-class.html"><code>TrustRoot</code></a></b></td>
  <td>This class represents an OpenID trust root.</td></tr>
</table><br />


<!-- =========== START OF FUNCTION SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Function Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.server.trustroot-module.html#returnToMatches" class="summary-sig-name"><code>returnToMatches</code></a>(<span class=summary-sig-arg>allowed_return_to_urls</span>,
          <span class=summary-sig-arg>return_to</span>)</span></code>
<br />
Is the return_to URL under one of the supplied allowed return_to 
URLs?</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.server.trustroot-module.html#verifyReturnTo" class="summary-sig-name"><code>verifyReturnTo</code></a>(<span class=summary-sig-arg>realm_str</span>,
          <span class=summary-sig-arg>return_to</span>,
          <span class=summary-sig-arg>_vrfy</span>)</span></code>
<br />
Verify that a return_to URL is valid for the given realm.</td></tr>
</table><br />


<!-- =========== START OF FUNCTION DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Function Details</th></tr>
</table>

<a name="returnToMatches"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">returnToMatches</span>(<span class=sig-arg>allowed_return_to_urls</span>,
          <span class=sig-arg>return_to</span>)</span>
  </h3>
  Is the return_to URL under one of the supplied allowed return_to 
  URLs?
  <dl><dt></dt><dd>
<p><b>Since:</b> 2.1.0
</p>

  </dd></dl>
</td></tr></table>

<a name="verifyReturnTo"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">verifyReturnTo</span>(<span class=sig-arg>realm_str</span>,
          <span class=sig-arg>return_to</span>,
          <span class=sig-arg>_vrfy</span>=<span class=sig-default>&lt;function&nbsp;getAllowedReturnURLs&nbsp;at&nbsp;0x83b5f0c&gt;</span>)</span>
  </h3>
  <p>Verify that a return_to URL is valid for the given realm.</p>
  This function builds a discovery URL, performs Yadis discovery on 
  it, makes sure that the URL does not redirect, parses out the return_to 
  URLs, and finally checks to see if the current return_to URL matches 
  the return_to.
  <dl><dt></dt><dd>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        True if the return_to URL is valid for the realm
      </dd>
    </dl>
    <dl><dt><b>Raises:</b></dt>
      <dd><code><b>DiscoveryFailure</b></code> -
        When Yadis discovery fails
    </dl>
<p><b>Since:</b> 2.1.0
</p>

  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri Dec 14 16:10:52 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
